<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        #banner{
         text-align: center;
        }
        #btn{
            display: none;
        }
    </style>
</head>
<body>
        <div id="banner"><img src="img/1.jpg"></div>
        <input type="button" name="box" value="重复播放" id="btn" onclick="s()">
        <script>
            var bannerobj = document.getElementById('banner');
            var btnobj = document.getElementById('btn');
            console.log(bannerobj);
            console.log(btnobj);
            function foo() {
                bannerobj.style.display = 'none';
                btnobj.style.display = 'inline-block';
            }
            function s () {
            bannerobj.style.display = 'block';
            btnobj.style.display = 'none';

            }
            setTimeout(foo,5000);

        </script>
</body>
</html>